<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <title>签到管理</title>
    <link rel="stylesheet" type="text/css" href="Assets/css/reset.css"/>
    <script type="text/javascript" src="Assets/js/jquery-1.8.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="Assets/plugins/FlexSlider/flexslider.css">
    <script type="text/javascript" src="Assets/plugins/FlexSlider/jquery.flexslider.js"></script>
    <script type="text/javascript" src="Assets/js/main.js"></script>
    <link rel="stylesheet" type="text/css" href="Assets/css/thems.css">
    <link rel="stylesheet" type="text/css" href="Assets/css/responsive.css">
    <script language="javascript">
    </script>
</head>

<body>
<!--头部-->
<div class="head clearfix">
    <div class="logo"><a href=""><img src="Assets/images/logo.jpg" alt="信本财富"/></a></div>
    <div class="head_r">
        <div class="lang">
            <a href="">中文</a>|
            <a href="">English</a>
        </div>
        <ul class="nav clearfix">
            <li class="now"><a href="index.html">首页</a></li>
            <li><a href="product.html">课程管理</a></li>
            <li><a href="vip.html">会员管理</a></li>
            <li><a href="sig_in.html">签到管理</a></li>
            <li><a href="custom-made.html">定制会员卡</a></li>
            <li><a href="subbranch.html">场馆管理</a></li>
            <li><a href="staff.html">员工管理</a></li>
        </ul>
        <div class="nav_m">
            <span class="n_icon">&nbsp;</span>
            <ul>
                <li><a href="index.html">首页</a></li>
                <li><a href="about.html">关于信本</a></li>
                <li><a href="news.html">信本动态</a></li>
                <li class="now"><a href="product.html">信本业务</a></li>
                <li><a href="#">信本学院</a></li>
                <li><a href="#">社会责任</a></li>
                <li><a href="#">联系我们</a></li>
            </ul>
        </div>
    </div>
</div>
<!--头部-->
<!--幻灯片-->
<div class="banner">
    <div class="slider">
        <div class="flexslider">
            <ul class="slides">
                <li>
                    <a href=""><img src="Assets/upload/banner.jpg" alt="" /></a>
                </li>
                <li>
                    <a href=""><img src="Assets/upload/banner_a.jpg" alt="" /></a>
                </li>
                <li>
                    <a href=""><img src="Assets/upload/banner_b.jpg" alt="" /></a>
                </li>
                <li>
                    <a href=""><img src="Assets/upload/banner_c.jpg" alt="" /></a>
                </li>
                <li>
                    <a href=""><img src="Assets/upload/banner_d.jpg" alt="" /></a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!--幻灯片-->
<div class="scd clearfix">
    <div class="scd_l">
        <div class="title"><span>课程</span></div>
        <ul class="s_nav">
            选择场馆:
            <select name="" id="coursestbodyul" onchange="signIn()">
                <option selected="selected"  value="">--请选择-- </option>
            </select>
        </ul>
    </div>
    <div class="scd_r">
        <div class="s_title">
            签到管理
            <div class="pst">
                当前位置：
                <a href="">首页</a>>
                <a href="">签到管理</a>>

            </div>
        </div>
        <div class="scd_m">
            <div class="pro">
                <ul class="pro_l clearfix" id="coursetbodyu2">

                    <!-- 自动生成标签 -->
                    <li>
                        <a href="sig_in1.html">
                            <img src="Assets/upload/pic8.jpg" alt=""/>
                            <p>进行签到</p>
                        </a>
                    </li>


                </ul>
                <div class="space_hx">&nbsp;</div>
            </div>
        </div>
    </div>
</div>

</body>
</html>
<script>
    $(function () {
        var path = "/" + location.pathname.split("/")[1];
        $.get(path+"/shopQuery",function (list) {
            console.log(list+"=================")

            $.each(list,function (i,li) {

                console.log(li)

                $("#coursestbodyul").append(
                    '<option value='+li.shopid+ '>'+li.shopname+'</option>'
                );

            });

        },"json");

    });

    function signIn() {

        $("#coursetbodyu2").empty();

        function getNow(s) {
            return s < 10 ? '0' + s: s;
        }

        var  time=new Date();
        var datt1= time.getMonth()+1;
        var datt= getNow(datt1);
        var dat =  getNow(time.getDate());
        var year  = time.getFullYear();
        var timesss =  year+"-"+datt+"-"+dat+"";//时间

        var shopid = $("#coursestbodyul").val();

        var path = "/" + location.pathname.split("/")[1];
        $.get(path+"/SigInQuery",{"courseClubid":shopid,"courseTime":timesss},function (list) {
            console.log(list+"=================")

            $.each(list,function (i,li) {

                console.log(li)

                $("#coursetbodyu2").append(

                    '<li>'+
                    '<a>'+
                    '<img src='+li.courseImg+' alt=""/>'+
                    '<p onclick="signInquery('+li.courseId+')">进行签到</p>'+
                    '</a>'+
                    '</li>'

                );

            });

        },"json");

    }

    function signInquery(iil){
        console.log(iil)

        var toUrl = "sig_in1.html?courseid="+iil;
        window.open(toUrl);
    }



</script>
